
#include "types.h"

ShapeType shapeTypeFromString( char* str )
{
	if( str==NULL )	return NONE;

	if		( strcmp(str, RECTENGLE_STRING)==0 )
		return RECTENGLE;
	else if ( strcmp(str, EMPTY_ELLIPSE_STRING)==0 )
		return EMPTY_ELLIPSE;
	else if ( strcmp(str, FULL_ELLIPSE_STRING)==0 )
		return FULL_ELLIPSE;
	else if ( strcmp(str, VORTEX_STRING)==0 )
		return VORTEX;
	else if ( strcmp(str, STAR_STRING)==0 )
		return STAR;

	return NONE;
}